import req from '../fetch/index'

const config = {
  // 用户登录
  userLogin: {
    url: '/api/login',
    method: 'post'
  },
  // 退出登录
  userLogout: {
    url: '/api/logout',
    method: 'post'
  },
  // 获取userid
  getUser: {
    url: '/api/getUser',
    method: 'get'
  },
  userInfo: {
    url: '/api/userInfo',
    method: 'get'
  },
  // 用户封禁
  banUser: {
    url: '/api/banUser',
    method: 'post'
  },
  // 更改密码
  updatePassword: {
    url: '/api/updatePassword',
    method: 'post'
  },
  // 用户充值
  recharge: {
    url: '/api/recharge',
    method: 'post'
  },
  // vip设置
  setVip: {
    url: '/api/setVip',
    method: 'post'
  }
}
const request = function (funcName, requestParam) {
  return req(config[funcName].url, config[funcName].method, requestParam, {}, config[funcName].fileConfig)
}
export default request
